<template>
    <div class="class-searchs">
        <div class="class-search">
            <el-input v-model="inputValue" placeholder="请输入搜索内容" size="medium"></el-input>
            <div class="class-search-button" >
                <el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
            </div>
            <div class="class-search-button" >
                <el-button type="success" icon="el-icon-plus" @click="handleAdd">添加</el-button>
            </div>
        </div>
  
    </div>
</template>

<script>
import Bus from './Bus'
    export default {

        methods: {
            handleSearch(){
                //发起请求
                 Bus.$emit('getRoleList',1,this.inputValue)
            },
            handleAdd() {
                //打开新增框
                Bus.$emit('addUser','add')
            }
        },
        data () {
            return {
                inputValue: '',
                createFormDialog: false
            }
        }
    }
</script>

<style scoped lang="scss">
.class-search {
  display: flex;
  padding: 0.2rem;
  background: #ffffff;
  .class-search-input{
    width: 70%;
    border-radius:25px;
  }
  .class-search-button{
    flex: 1;
    margin-left: 0.3rem; 
  }
}

</style>